﻿<Window x:Class="ContactTracing.LabView.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:local="clr-namespace:ContactTracing.LabView"
        xmlns:vm="clr-namespace:ContactTracing.ViewModel;assembly=ContactTracing.ViewModel"
        xmlns:sys="clr-namespace:System;assembly=mscorlib"
        xmlns:converters="clr-namespace:ContactTracing.Core.Converters;assembly=ContactTracing.Core"
        xmlns:wpf="clr-namespace:ContactTracing.Controls;assembly=ContactTracing.WPF"
        xmlns:p="clr-namespace:ContactTracing.LabView.Properties"
        SnapsToDevicePixels="True"
        Icon="App.ico"
        Title="{Binding Source={x:Static p:Settings.Default}, Path=WindowTitle, Mode=OneWay}"
        Height="{Binding Source={x:Static p:Settings.Default}, Path=WindowHeight, Mode=TwoWay}" Width="{Binding Source={x:Static p:Settings.Default}, Path=WindowWidth, Mode=TwoWay}" WindowState="{Binding Source={x:Static p:Settings.Default}, Path=WindowState, Mode=TwoWay}"
        Loaded="Window_Loaded" SizeChanged="Window_SizeChanged" Closing="Window_Closing">
    <Window.DataContext>
        <local:LabDataHelper x:Name="labDataHelper" CaseDataPopulated="LabDataHelper_CaseDataPopulated" LabRecordAdded="LabDataHelper_LabRecordAdded" />
    </Window.DataContext>
    <Window.TaskbarItemInfo>
        <TaskbarItemInfo ProgressState="{Binding TaskbarProgressState}" ProgressValue="{Binding TaskbarProgressValue}" />
    </Window.TaskbarItemInfo>
    <Window.Resources>
        <BooleanToVisibilityConverter x:Key="boolConverter" />
        <converters:UppercaseConverter x:Key="UppercaseConverter" />
        
        <SolidColorBrush x:Key="textMediumGray" Color="#FF727272"></SolidColorBrush>
        <SolidColorBrush x:Key="textDarkGray" Color="#FF383838"></SolidColorBrush>
        <SolidColorBrush x:Key="lineDefault" Color="Gray"></SolidColorBrush>
        <SolidColorBrush x:Key="buttonHomeHighlight" Color="#5EA8DE"></SolidColorBrush>
        <SolidColorBrush x:Key="buttonAnalysisHighlight" Color="#5EA8DE"></SolidColorBrush>
        <SolidColorBrush x:Key="buttonDataEntryHighlight" Color="#5EA8DE"></SolidColorBrush>
        <SolidColorBrush x:Key="buttonDataManagementHighlight" Color="#5EA8DE"></SolidColorBrush>
        <SolidColorBrush x:Key="buttonMapsHighlight" Color="#5EA8DE"></SolidColorBrush>
        <SolidColorBrush x:Key="buttonStatusHighlight" Color="#5EA8DE"></SolidColorBrush>
    </Window.Resources>
    <Grid VerticalAlignment="Stretch" x:Name="grdMain" Background="{StaticResource WindowBackgroundBrush}">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="1" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>

        <StackPanel Grid.Row="0" Background="{StaticResource NoiseBrush}">
            <StackPanel>
                <StackPanel.Background>
                    <SolidColorBrush Color="{StaticResource NoisedHighlightColor}" Opacity="0.8" />
                </StackPanel.Background>
                <Grid Margin="6">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition />
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                    </Grid.ColumnDefinitions>

                    <StackPanel Grid.Column="0">
                        <TextBlock Margin="24, 4, 0, 0" Style="{StaticResource Heading1}" FontWeight="Light" Foreground="White" x:Name="tblockHeading1" Text="{Binding OutbreakName}" />
                    </StackPanel>

                    <StackPanel Grid.Column="1" HorizontalAlignment="Center" Margin="4, 0, 0, 0">
                        <wpf:LightOnDarkCircleButton x:Name="btnRefresh" 
                                                     Text="Refresh" 
                                                     PathData="F1 M 38,20.5833C 42.9908,20.5833 47.4912,22.6825 50.6667,26.046L 50.6667,17.4167L 55.4166,22.1667L 55.4167,34.8333L 42.75,34.8333L 38,30.0833L 46.8512,30.0833C 44.6768,27.6539 41.517,26.125 38,26.125C 31.9785,26.125 27.0037,30.6068 26.2296,36.4167L 20.6543,36.4167C 21.4543,27.5397 28.9148,20.5833 38,20.5833 Z M 38,49.875C 44.0215,49.875 48.9963,45.3932 49.7703,39.5833L 55.3457,39.5833C 54.5457,48.4603 47.0852,55.4167 38,55.4167C 33.0092,55.4167 28.5088,53.3175 25.3333,49.954L 25.3333,58.5833L 20.5833,53.8333L 20.5833,41.1667L 33.25,41.1667L 38,45.9167L 29.1487,45.9167C 31.3231,48.3461 34.483,49.875 38,49.875 Z "
                                                          Command="{Binding RepopulateCollectionsCommand}" CommandParameter="{StaticResource False}" />
                    </StackPanel>

                    <StackPanel Grid.Column="2" HorizontalAlignment="Center" Margin="4, 0, 0, 0">
                        <wpf:LightOnDarkCircleButton x:Name="btnSettings" Text="{x:Static p:Resources.Settings}" 
                                                     PathData="F1 M 27.5314,21.8628L 33.0126,19.4224L 34.7616,23.3507C 36.6693,22.9269 38.6044,22.8903 40.4668,23.2026L 42.0083,19.1868L 47.6098,21.337L 46.0683,25.3528C 47.6612,26.3669 49.0747,27.6889 50.2088,29.2803L 54.1371,27.5313L 56.5776,33.0126L 52.6493,34.7616C 53.0731,36.6693 53.1097,38.6043 52.7974,40.4668L 56.8131,42.0083L 54.6629,47.6097L 50.6472,46.0683C 49.6331,47.6613 48.3111,49.0748 46.7197,50.2089L 48.4686,54.1372L 42.9874,56.5776L 41.2384,52.6493C 39.3307,53.0731 37.3957,53.1097 35.5333,52.7974L 33.9918,56.8131L 28.3903,54.6629L 29.9318,50.6472C 28.3388,49.6331 26.9252,48.3111 25.7911,46.7196L 21.8628,48.4686L 19.4224,42.9873L 23.3507,41.2383C 22.9269,39.3307 22.8903,37.3957 23.2026,35.5332L 19.1869,33.9918L 21.3371,28.3903L 25.3528,29.9318C 26.3669,28.3388 27.6889,26.9252 29.2804,25.7911L 27.5314,21.8628 Z M 34.3394,29.7781C 29.7985,31.7998 27.7564,37.1198 29.7781,41.6606C 31.7998,46.2015 37.1198,48.2436 41.6606,46.2219C 46.2015,44.2002 48.2436,38.8802 46.2219,34.3394C 44.2002,29.7985 38.8802,27.7564 34.3394,29.7781 Z "
                                                          Click="btnSettings_Click" />
                    </StackPanel>
                    <StackPanel Grid.Column="3" HorizontalAlignment="Center" Margin="4, 0, 0, 0">
                        <wpf:LightOnDarkCircleButton x:Name="btnCloseProject" Text="{x:Static p:Resources.Close}" 
                                                     PathData="F1 M 26.9166,22.1667L 37.9999,33.25L 49.0832,22.1668L 53.8332,26.9168L 42.7499,38L 53.8332,49.0834L 49.0833,53.8334L 37.9999,42.75L 26.9166,53.8334L 22.1666,49.0833L 33.25,38L 22.1667,26.9167L 26.9166,22.1667 Z "
                                                          Click="btnCloseProject_Click" />
                    </StackPanel>
                </Grid>
            </StackPanel>
        </StackPanel>

        <StackPanel Height="4" Grid.Row="1">
            <!--<StackPanel Height="4" Grid.ColumnSpan="100" HorizontalAlignment="Stretch" VerticalAlignment="Top">-->
                <StackPanel.Background>
                    <LinearGradientBrush StartPoint="0,0" EndPoint="0,1" >
                        <LinearGradientBrush.GradientStops>
                            <GradientStop Color="#FF9D9D9D" Offset="0" />
                            <GradientStop Color="#009D9D9D" Offset="1.0" />
                            <!--<GradientStop Color="#00F7F7F9" Offset="1.0" />-->
                        </LinearGradientBrush.GradientStops>
                    </LinearGradientBrush>
                </StackPanel.Background>
            <!--</StackPanel>-->
            <!-- this is where tabs would go -->
        </StackPanel>

        <!--<DockPanel Grid.Row="2" Height="1" Background="#F3F3F3" />-->

        <Grid x:Name="gridCaseManagement" Visibility="Visible" Background="{StaticResource mainPanelBackgroundBrush}" Grid.Row="3" VerticalAlignment="Stretch">
            <!--<DockPanel x:Name="gridCaseManagement" VerticalAlignment="Stretch"  Grid.Row="3" Background="{StaticResource mainPanelBackgroundBrush}">-->
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>

            <StackPanel x:Name="panelCaseManagementSearch" Grid.Row="0" Margin="10,5,0,5">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition />
                        <ColumnDefinition Width="Auto" />
                    </Grid.ColumnDefinitions>
                    <!--<TextBlock Grid.Column="0" FontWeight="Light" Foreground="#585858" FontSize="24" Text="{x:Static p:Resources.CaseManagement}" />-->
                    <TextBlock Grid.Column="0" Style="{StaticResource Heading1}" Text="{x:Static p:Resources.LaboratoryDatabaseHeading}" />
                    <!--<Image Grid.Column="1" Width="20" Height="20" Margin="20,0,20,0" Source="Images\word.png" Cursor="Hand" MouseDown="caseFormPrint_Click"/>-->
                </Grid>
                <DockPanel Height="8" />
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="*" />
                    </Grid.ColumnDefinitions>
                    <!--<wpf:SearchBox Margin="0, 0, 10, 0" x:Name="labSearchBox" Grid.Column="1" SearchText="{Binding SearchSamplesText,UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}" Search="{Binding SearchSamples}" HorizontalAlignment="Right" />-->
                </Grid>
            </StackPanel>

            <StackPanel x:Name="panelCaseMain" Grid.Column="0" Grid.Row="1" Margin="10,5,10,10" DockPanel.Dock="Top">
                <Border Background="{StaticResource DataGridHeaderBackgroundBrush}">
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition/>
                            <ColumnDefinition Width="Auto"/>
                        </Grid.ColumnDefinitions>
                        <TextBlock Margin="5" FontWeight="SemiBold" FontSize="16" Foreground="{StaticResource DataGridHeaderForegroundBrush}">Samples</TextBlock>
                        <StackPanel Grid.Column="1" Margin="2" Orientation="Horizontal">

                            <Button x:Name="btnAddCase" Margin="1" Height="20" Style="{StaticResource FlatButtonStyle}" Click="btnAddCase_Click">
                                <TextBlock Text="{x:Static p:Resources.AddCase}" />
                            </Button>

                            <Button x:Name="btnDeleteCase" Margin="1" Height="20" Style="{StaticResource FlatButtonStyle}" Click="btnDeleteCase_Click">
                                <TextBlock Text="{x:Static p:Resources.Delete}" />
                            </Button>

                            <!--<Button x:Name="btnPrintDailyLabSummary" Margin="1" Height="20" Style="{StaticResource FlatButtonStyle}" Click="btnPrintDailyLabSummary_Click">                                
                                <TextBlock>Print</TextBlock>
                            </Button>-->

                            <Button x:Name="btnExportDailyLabSummary" Margin="1" Height="20" Style="{StaticResource FlatButtonStyle}" Click="btnExportDailyLabSummary_Click">
                                <TextBlock Text="{x:Static p:Resources.DailySummary}" />
                            </Button>

                            <Button x:Name="btnExportForEpi" Margin="1" Height="20" Style="{StaticResource FlatButtonStyle}" Click="btnExportForEpi_Click">
                                <Button.ContextMenu>
                                    <ContextMenu>
                                        <MenuItem Header="Export only records created or updated in the last two days" Click="btnExportForEpiLastTwo_Click"></MenuItem>
                                        <MenuItem Header="Export all records" Click="btnExportForEpiAll_Click"></MenuItem>
                                    </ContextMenu>
                                </Button.ContextMenu>
                                <TextBlock Text="{x:Static p:Resources.ExportToEpi}" />
                            </Button>

                            <Button x:Name="btnExport" Margin="1" Height="20" Style="{StaticResource FlatButtonStyle}" Click="btnExportCases_Click">
                                <!--<Button.ContextMenu>
                                    <ContextMenu>
                                        <MenuItem Header="Export full data set" Click="btnExportFull_Click"></MenuItem>
                                        <MenuItem Header="Export data for external users" Click="btnExportPartial_Click"></MenuItem>
                                    </ContextMenu>
                                </Button.ContextMenu>-->
                                <TextBlock Text="{x:Static p:Resources.ExportToFile}" />
                            </Button>
                        </StackPanel>
                    </Grid>
                </Border>
                <DataGrid x:Name="dgCases" VerticalAlignment="Stretch"
                      ItemsSource="{Binding LabResultCollection, Mode=Default, IsAsync=True, FallbackValue=...}"   
                            VirtualizingStackPanel.IsVirtualizing="True"
                            VirtualizingStackPanel.VirtualizationMode="Recycling"
                      Style="{StaticResource DataGridDemoStyle}"
                          AutoGenerateColumns="False"
                      SelectionChanged="dgCases_SelectionChanged" MouseDoubleClick="dgCases_MouseDoubleClick">
                    <DataGrid.Columns>
                        <DataGridTextColumn DisplayIndex="0" Header="{x:Static p:Resources.ColHeaderSurname}" Binding="{Binding Surname}" IsReadOnly="True"></DataGridTextColumn>
                        <DataGridTextColumn DisplayIndex="1" Header="{x:Static p:Resources.ColHeaderOtherNames}" Binding="{Binding OtherNames}" IsReadOnly="True"></DataGridTextColumn>
                        <DataGridTextColumn DisplayIndex="2" Binding="{Binding CaseID}" IsReadOnly="True">
                            <DataGridTextColumn.HeaderTemplate>
                                <DataTemplate>
                                    <TextBlock TextAlignment="Center" Text="{x:Static p:Resources.ColHeaderID}" />
                                </DataTemplate>
                            </DataGridTextColumn.HeaderTemplate>
                        </DataGridTextColumn>

                        <DataGridTextColumn DisplayIndex="3" Binding="{Binding Age}" IsReadOnly="True">
                            <DataGridTextColumn.HeaderTemplate>
                                <DataTemplate>
                                    <TextBlock TextAlignment="Center" Text="Age" />
                                </DataTemplate>
                            </DataGridTextColumn.HeaderTemplate>
                        </DataGridTextColumn>

                        <DataGridTextColumn DisplayIndex="4" Binding="{Binding Gender}" IsReadOnly="True">
                            <DataGridTextColumn.HeaderTemplate>
                                <DataTemplate>
                                    <TextBlock TextAlignment="Center" Text="Gender" />
                                </DataTemplate>
                            </DataGridTextColumn.HeaderTemplate>
                        </DataGridTextColumn>
                        
                        
                        <DataGridTextColumn DisplayIndex="5" Binding="{Binding ResultNumber}" IsReadOnly="True">
                            <DataGridTextColumn.ElementStyle>
                                <Style TargetType="TextBlock">
                                    <Setter Property="TextAlignment" Value="Right" />
                                </Style>
                            </DataGridTextColumn.ElementStyle>
                            
                            <DataGridTextColumn.HeaderTemplate>
                                <DataTemplate>
                                    <TextBlock TextAlignment="Center">
                                        SP #
                                    </TextBlock>
                                </DataTemplate>
                            </DataGridTextColumn.HeaderTemplate>
                        </DataGridTextColumn>
                        <DataGridTextColumn DisplayIndex="6" Binding="{Binding FieldLabSpecimenID}" IsReadOnly="True">
                            <DataGridTextColumn.ElementStyle>
                                <Style TargetType="TextBlock">
                                    <Setter Property="TextAlignment" Value="Right" />
                                </Style>
                            </DataGridTextColumn.ElementStyle>
                            
                            <DataGridTextColumn.HeaderTemplate>
                                <DataTemplate>
                                    <TextBlock TextAlignment="Center" Text="{x:Static p:Resources.ColHeaderFLSID}" />
                                </DataTemplate>
                            </DataGridTextColumn.HeaderTemplate>
                        </DataGridTextColumn>
                        <DataGridTextColumn DisplayIndex="7" Header="UVRI VSPB Log #" Binding="{Binding UVRIVSPBLogNumber}" IsReadOnly="True">
                            <DataGridTextColumn.ElementStyle>
                                <Style TargetType="TextBlock">
                                    <Setter Property="TextAlignment" Value="Right" />
                                </Style>
                            </DataGridTextColumn.ElementStyle>
                        </DataGridTextColumn>
                        <DataGridTextColumn DisplayIndex="8" Header="{x:Static p:Resources.ColHeaderVillage}" Binding="{Binding Village}" IsReadOnly="True" />
                        <DataGridTextColumn DisplayIndex="9" Header="{x:Static p:Resources.ColHeaderDistrict}" Binding="{Binding District}" IsReadOnly="True" />
                        <DataGridTextColumn DisplayIndex="10" Header="{x:Static p:Resources.ColHeaderSampleType}" Binding="{Binding SampleType}" IsReadOnly="True" />
                        <DataGridTextColumn DisplayIndex="11" Binding="{Binding DateOnset, StringFormat='dd/MM/yyyy'}" IsReadOnly="True">
                            <DataGridTextColumn.ElementStyle>
                                <Style TargetType="TextBlock">
                                    <Setter Property="TextAlignment" Value="Right" />
                                </Style>
                            </DataGridTextColumn.ElementStyle>

                            <DataGridTextColumn.HeaderTemplate>
                                <DataTemplate>
                                    <TextBlock TextAlignment="Center" Text="{x:Static p:Resources.ColHeaderOnsetDate}" />
                                </DataTemplate>
                            </DataGridTextColumn.HeaderTemplate>
                        </DataGridTextColumn>
                        <DataGridTextColumn DisplayIndex="12" Binding="{Binding DateSampleCollected, StringFormat='dd/MM/yyyy'}" IsReadOnly="True">
                            <DataGridTextColumn.ElementStyle>
                                <Style TargetType="TextBlock">
                                    <Setter Property="TextAlignment" Value="Right" />
                                </Style>
                            </DataGridTextColumn.ElementStyle>
                            
                            <DataGridTextColumn.HeaderTemplate>
                                <DataTemplate>
                                    <TextBlock TextAlignment="Center" Text="{x:Static p:Resources.ColHeaderDateSampleCollected}" />
                                </DataTemplate>
                            </DataGridTextColumn.HeaderTemplate>
                        </DataGridTextColumn>
                        <DataGridTextColumn DisplayIndex="13" Header="{x:Static p:Resources.ColHeaderDaysAcute}" Binding="{Binding DaysAcute}" IsReadOnly="True">
                            <DataGridTextColumn.ElementStyle>
                                <Style TargetType="TextBlock">
                                    <Setter Property="TextAlignment" Value="Right" />
                                </Style>
                            </DataGridTextColumn.ElementStyle>
                        </DataGridTextColumn>
                        <DataGridTextColumn DisplayIndex="14" Binding="{Binding DateSampleTested, StringFormat='dd/MM/yyyy'}" IsReadOnly="True">
                            <DataGridTextColumn.ElementStyle>
                                <Style TargetType="TextBlock">
                                    <Setter Property="TextAlignment" Value="Right" />
                                </Style>
                            </DataGridTextColumn.ElementStyle>
                            
                            <DataGridTextColumn.HeaderTemplate>
                                <DataTemplate>
                                    <TextBlock TextAlignment="Center" Text="{x:Static p:Resources.ColHeaderDateSampleTested}" />
                                </DataTemplate>
                            </DataGridTextColumn.HeaderTemplate>
                        </DataGridTextColumn>
                        <DataGridTextColumn DisplayIndex="15" Binding="{Binding DateDeath, StringFormat='dd/MM/yyyy'}" IsReadOnly="True">
                            <DataGridTextColumn.ElementStyle>
                                <Style TargetType="TextBlock">
                                    <Setter Property="TextAlignment" Value="Right" />
                                </Style>
                            </DataGridTextColumn.ElementStyle>
                            
                            <DataGridTextColumn.HeaderTemplate>
                                <DataTemplate>
                                    <TextBlock TextAlignment="Center" Text="{x:Static p:Resources.ColHeaderDateDeath}" />
                                </DataTemplate>
                            </DataGridTextColumn.HeaderTemplate>
                        </DataGridTextColumn>
                        <DataGridTextColumn DisplayIndex="16" Binding="{Binding FinalLabClassification}" IsReadOnly="True">
                            <DataGridTextColumn.HeaderTemplate>
                                <DataTemplate>
                                    <TextBlock TextAlignment="Center" Text="{x:Static p:Resources.ColHeaderFinalLabClass}" />
                                </DataTemplate>
                            </DataGridTextColumn.HeaderTemplate>
                        </DataGridTextColumn>
                        <DataGridTextColumn DisplayIndex="17" Header="{x:Static p:Resources.ColHeaderSampleInterpretation}" Binding="{Binding SampleInterpretation}" IsReadOnly="True" />

                        <DataGridTextColumn x:Name="SUDVPCR" Header="SUDV NP qRT-PCR" Binding="{Binding SUDVPCR}" IsReadOnly="True" Visibility="{Binding Source={x:Reference labDataHelper}, Path=SudanTestsDetected, Converter={StaticResource boolConverter}}" />
                        <DataGridTextColumn x:Name="SUDVPCR2" Header="SUDV qRT-PCR 2" Binding="{Binding SUDVPCR2}" IsReadOnly="True" Visibility="{Binding Source={x:Reference labDataHelper}, Path=SudanTestsDetected, Converter={StaticResource boolConverter}}" />
                        <DataGridTextColumn x:Name="SUDVAg" Header="SUDV Antigen" Binding="{Binding SUDVAg}" IsReadOnly="True" Visibility="{Binding Source={x:Reference labDataHelper}, Path=SudanTestsDetected, Converter={StaticResource boolConverter}}" />
                        <DataGridTextColumn x:Name="SUDVIgM" Header="SUDV IgM" Binding="{Binding SUDVIgM}" IsReadOnly="True" Visibility="{Binding Source={x:Reference labDataHelper}, Path=SudanTestsDetected, Converter={StaticResource boolConverter}}" />
                        <DataGridTextColumn x:Name="SUDVIgG" Header="SUDV IgG" Binding="{Binding SUDVIgG}" IsReadOnly="True" Visibility="{Binding Source={x:Reference labDataHelper}, Path=SudanTestsDetected, Converter={StaticResource boolConverter}}" />

                        <DataGridTextColumn x:Name="BDBVPCR" Header="BDBV NP qRT-PCR" Binding="{Binding BDBVPCR}" IsReadOnly="True" Visibility="{Binding Source={x:Reference labDataHelper}, Path=BundibugyoTestsDetected, Converter={StaticResource boolConverter}}" />
                        <DataGridTextColumn x:Name="BDBVPCR2" Header="BDBV VP40 qRT-PCR" Binding="{Binding BDBVPCR2}" IsReadOnly="True" Visibility="{Binding Source={x:Reference labDataHelper}, Path=BundibugyoTestsDetected, Converter={StaticResource boolConverter}}" />
                        <DataGridTextColumn x:Name="BDBVAg" Header="BDBV Antigen" Binding="{Binding BDBVAg}" IsReadOnly="True" Visibility="{Binding Source={x:Reference labDataHelper}, Path=BundibugyoTestsDetected, Converter={StaticResource boolConverter}}" />
                        <DataGridTextColumn x:Name="BDBVIgM" Header="BDBV IgM" Binding="{Binding BDBVIgM}" IsReadOnly="True" Visibility="{Binding Source={x:Reference labDataHelper}, Path=BundibugyoTestsDetected, Converter={StaticResource boolConverter}}" />
                        <DataGridTextColumn x:Name="BDBVIgG" Header="BDBV IgG" Binding="{Binding BDBVIgG}" IsReadOnly="True" Visibility="{Binding Source={x:Reference labDataHelper}, Path=BundibugyoTestsDetected, Converter={StaticResource boolConverter}}" />

                        <DataGridTextColumn x:Name="EBOVPCR" Header="EBOV qRT-PCR 1" Binding="{Binding EBOVPCR}" IsReadOnly="True" Visibility="{Binding Source={x:Reference labDataHelper}, Path=EbolaTestsDetected, Converter={StaticResource boolConverter}}" />
                        <DataGridTextColumn x:Name="EBOVPCR2" Header="EBOV qRT-PCR 2" Binding="{Binding EBOVPCR2}" IsReadOnly="True" Visibility="{Binding Source={x:Reference labDataHelper}, Path=EbolaTestsDetected, Converter={StaticResource boolConverter}}" />
                        <DataGridTextColumn x:Name="EBOVAg" Header="EBOV Antigen" Binding="{Binding EBOVAg}" IsReadOnly="True" Visibility="{Binding Source={x:Reference labDataHelper}, Path=EbolaTestsDetected, Converter={StaticResource boolConverter}}" />
                        <DataGridTextColumn x:Name="EBOVIgM" Header="EBOV IgM" Binding="{Binding EBOVIgM}" IsReadOnly="True" Visibility="{Binding Source={x:Reference labDataHelper}, Path=EbolaTestsDetected, Converter={StaticResource boolConverter}}" />
                        <DataGridTextColumn x:Name="EBOVIgG" Header="EBOV IgG" Binding="{Binding EBOVIgG}" IsReadOnly="True" Visibility="{Binding Source={x:Reference labDataHelper}, Path=EbolaTestsDetected, Converter={StaticResource boolConverter}}" />

                        <DataGridTextColumn x:Name="MARVPCR" Header="MARV Pol qRT-PCR" Binding="{Binding MARVPCR}" IsReadOnly="True" Visibility="{Binding Source={x:Reference labDataHelper}, Path=MarburgTestsDetected, Converter={StaticResource boolConverter}}" />
                        <DataGridTextColumn x:Name="MARVPCR2" Header="MARV VP40 qRT-PCR" Binding="{Binding MARVPCR2}" IsReadOnly="True" Visibility="{Binding Source={x:Reference labDataHelper}, Path=MarburgTestsDetected, Converter={StaticResource boolConverter}}" />
                        <DataGridTextColumn x:Name="MARVAg" Header="MARV Antigen" Binding="{Binding MARVAg}" IsReadOnly="True" Visibility="{Binding Source={x:Reference labDataHelper}, Path=MarburgTestsDetected, Converter={StaticResource boolConverter}}" />
                        <DataGridTextColumn x:Name="MARVIgM" Header="MARV IgM" Binding="{Binding MARVIgM}" IsReadOnly="True" Visibility="{Binding Source={x:Reference labDataHelper}, Path=MarburgTestsDetected, Converter={StaticResource boolConverter}}" />
                        <DataGridTextColumn x:Name="MARVIgG" Header="MARV IgG" Binding="{Binding MARVIgG}" IsReadOnly="True" Visibility="{Binding Source={x:Reference labDataHelper}, Path=MarburgTestsDetected, Converter={StaticResource boolConverter}}" />

                        <DataGridTextColumn x:Name="CCHFPCR" Header="CCHF Pol qRT-PCR" Binding="{Binding CCHFPCR}" IsReadOnly="True" Visibility="{Binding Source={x:Reference labDataHelper}, Path=CCHFTestsDetected, Converter={StaticResource boolConverter}}" />
                        <DataGridTextColumn x:Name="CCHFPCR2" Header="CCHF VP40 qRT-PCR" Binding="{Binding CCHFPCR2}" IsReadOnly="True" Visibility="{Binding Source={x:Reference labDataHelper}, Path=CCHFTestsDetected, Converter={StaticResource boolConverter}}" />
                        <DataGridTextColumn x:Name="CCHFAg" Header="CCHF Antigen" Binding="{Binding CCHFAg}" IsReadOnly="True" Visibility="{Binding Source={x:Reference labDataHelper}, Path=CCHFTestsDetected, Converter={StaticResource boolConverter}}" />
                        <DataGridTextColumn x:Name="CCHFIgM" Header="CCHF IgM" Binding="{Binding CCHFIgM}" IsReadOnly="True" Visibility="{Binding Source={x:Reference labDataHelper}, Path=CCHFTestsDetected, Converter={StaticResource boolConverter}}" />
                        <DataGridTextColumn x:Name="CCHFIgG" Header="CCHF IgG" Binding="{Binding CCHFIgG}" IsReadOnly="True" Visibility="{Binding Source={x:Reference labDataHelper}, Path=CCHFTestsDetected, Converter={StaticResource boolConverter}}" />

                        <DataGridTextColumn x:Name="RVFPCR" Header="RVF Pol qRT-PCR" Binding="{Binding RVFPCR}" IsReadOnly="True" Visibility="{Binding Source={x:Reference labDataHelper}, Path=RiftTestsDetected, Converter={StaticResource boolConverter}}" />
                        <DataGridTextColumn x:Name="RVFPCR2" Header="RVF VP40 qRT-PCR" Binding="{Binding RVFPCR2}" IsReadOnly="True" Visibility="{Binding Source={x:Reference labDataHelper}, Path=RiftTestsDetected, Converter={StaticResource boolConverter}}" />
                        <DataGridTextColumn x:Name="RVFAg" Header="RVF Antigen" Binding="{Binding RVFAg}" IsReadOnly="True" Visibility="{Binding Source={x:Reference labDataHelper}, Path=RiftTestsDetected, Converter={StaticResource boolConverter}}" />
                        <DataGridTextColumn x:Name="RVFIgM" Header="RVF IgM" Binding="{Binding RVFIgM}" IsReadOnly="True" Visibility="{Binding Source={x:Reference labDataHelper}, Path=RiftTestsDetected, Converter={StaticResource boolConverter}}" />
                        <DataGridTextColumn x:Name="RVFIgG" Header="RVF IgG" Binding="{Binding RVFIgG}" IsReadOnly="True" Visibility="{Binding Source={x:Reference labDataHelper}, Path=RiftTestsDetected, Converter={StaticResource boolConverter}}" />

                        <DataGridTextColumn x:Name="LHFPCR" Header="LHF Pol qRT-PCR" Binding="{Binding LHFPCR}" IsReadOnly="True" Visibility="{Binding Source={x:Reference labDataHelper}, Path=LassaTestsDetected, Converter={StaticResource boolConverter}}" />
                        <DataGridTextColumn x:Name="LHFPCR2" Header="LHF VP40 qRT-PCR" Binding="{Binding LHFPCR2}" IsReadOnly="True" Visibility="{Binding Source={x:Reference labDataHelper}, Path=LassaTestsDetected, Converter={StaticResource boolConverter}}" />
                        <DataGridTextColumn x:Name="LHFAg" Header="LHF Antigen" Binding="{Binding LHFAg}" IsReadOnly="True" Visibility="{Binding Source={x:Reference labDataHelper}, Path=LassaTestsDetected, Converter={StaticResource boolConverter}}" />
                        <DataGridTextColumn x:Name="LHFIgM" Header="LHF IgM" Binding="{Binding LHFIgM}" IsReadOnly="True" Visibility="{Binding Source={x:Reference labDataHelper}, Path=LassaTestsDetected, Converter={StaticResource boolConverter}}" />
                        <DataGridTextColumn x:Name="LHFIgG" Header="LHF IgG" Binding="{Binding LHFIgG}" IsReadOnly="True" Visibility="{Binding Source={x:Reference labDataHelper}, Path=LassaTestsDetected, Converter={StaticResource boolConverter}}" />

                        <DataGridTextColumn DisplayIndex="51" Binding="{Binding MalariaRapidTest}" IsReadOnly="True">
                            <DataGridTextColumn.HeaderTemplate>
                                <DataTemplate>
                                    <TextBlock TextAlignment="Center" Text="{x:Static p:Resources.ColHeaderMRT}" />
                                </DataTemplate>
                            </DataGridTextColumn.HeaderTemplate>
                        </DataGridTextColumn>
                    </DataGrid.Columns>
                </DataGrid>
            </StackPanel>
        </Grid>

        <StackPanel Grid.Column="100" Grid.Row="100" HorizontalAlignment="Right" VerticalAlignment="Bottom" Orientation="Horizontal">
            <Label Margin="0, 0, 6, 3" Foreground="{StaticResource MediumTextBrush}" Content="EPI INFO VHF" />
            <Label x:Name="lblVersion" HorizontalAlignment="Right" VerticalAlignment="Bottom" Grid.Column="10" Grid.Row="100" Foreground="{StaticResource MediumTextBrush}" Margin="6, 0, 6, 3" />
        </StackPanel>

        <Grid x:Name="grdIntro" Grid.Row="0" Grid.RowSpan="100" Grid.Column="0" Grid.ColumnSpan="100" Background="{StaticResource WindowBackgroundBrush}" Visibility="Visible">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="380"/>
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="*" />
            </Grid.RowDefinitions>

            <Grid Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2">
                <TextBlock HorizontalAlignment="Left" Margin="30, 10, 20, 20" Style="{StaticResource Heading1}" Text="{Binding Source={x:Static p:Settings.Default}, Path=Heading, Mode=OneWay, Converter={StaticResource UppercaseConverter}}" />
            </Grid>

            <Grid Grid.Column="0" Grid.Row="1">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="*" />
                </Grid.RowDefinitions>
                <StackPanel Grid.Row="0">
                    <Label HorizontalAlignment="Left" Margin="30, 0, 20, 0" Style="{StaticResource LabelHeading2}" Content="{x:Static p:Resources.Welcome}" />
                </StackPanel>
                <Grid Grid.Row="1" Margin="30, 0, 60, 20" Background="{StaticResource HatchBrush}">
                    <Rectangle Fill="{StaticResource DarkTextBrush}" Height="5" VerticalAlignment="Top"></Rectangle>
                    <!--<content:RecentDataSources Margin="0, 8, 0, 0" />-->
                    <StackPanel Margin="10">
                        <TextBlock VerticalAlignment="Top" TextWrapping="Wrap" FontSize="14" Text="{x:Static p:Resources.Instructions1}" />
                        <StackPanel Height="10" />
                        <TextBlock VerticalAlignment="Top" TextWrapping="Wrap" FontSize="14" Text="{x:Static p:Resources.Instructions2}" />
                        <StackPanel Height="10" />
                        <StackPanel Height="1" Background="{StaticResource DarkTextBrush}" />
                        <StackPanel Height="10" />
                        <Grid HorizontalAlignment="Left" Background="Transparent" MouseDown="Grid_MouseDown">
                            <Grid.Style>
                                <Style TargetType="{x:Type Grid}">
                                    <Style.Triggers>
                                        <Trigger Property="IsMouseOver" Value="True">
                                            <Setter Property="Background">
                                                <Setter.Value>
                                                    <SolidColorBrush Opacity="0.5" Color="Silver" />
                                                </Setter.Value>
                                            </Setter>
                                        </Trigger>
                                    </Style.Triggers>
                                </Style>
                            </Grid.Style>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="46" />
                                <ColumnDefinition Width="*" />
                            </Grid.ColumnDefinitions>
                            <Path Grid.Column="0" Width="22" Height="22" Stretch="Fill" Fill="{StaticResource AccentBrush}" Data="F1 M 35,19L 41,19L 41,35L 57,35L 57,41L 41,41L 41,57L 35,57L 35,41L 19,41L 19,35L 35,35L 35,19 Z "/>
                            <Path Grid.Column="0" x:Name="Base_Circle" Width="38" Height="38" Stretch="Fill" Fill="{StaticResource AccentBrush}" Data="F1 M 38,0.791664C 58.5496,0.791664 75.2083,17.4504 75.2083,38C 75.2083,58.5496 58.5496,75.2083 38,75.2083C 17.4504,75.2083 0.791662,58.5496 0.791662,38C 0.791662,17.4504 17.4504,0.791664 38,0.791664 Z M 38,5.54166C 20.0738,5.54166 5.54167,20.0738 5.54167,38C 5.54167,55.9262 20.0738,70.4583 38,70.4583C 55.9262,70.4583 70.4583,55.9262 70.4583,38C 70.4583,20.0738 55.9262,5.54166 38,5.54166 Z "/>

                            <TextBlock Grid.Column="1" VerticalAlignment="Center" FontSize="16" FontWeight="Bold" Margin="10, 0, 0, 2" Text="{x:Static p:Resources.NewOutbreak}" />
                        </Grid>

                        <!--<Path Fill="#9A1D20" Data="" />-->
                    </StackPanel>
                </Grid>
            </Grid>

            <Grid Grid.Column="1" Grid.Row="1">
                <wpf:FileScreen x:Name="fileScreen" ApplicationType="Lab" Grid.RowSpan="10" ProjectOpened="fileScreen_ProjectOpened" />
            </Grid>
        </Grid>

        <DockPanel Grid.RowSpan="100" Background="{StaticResource WindowBackgroundBrush}" x:Name="panelLoading" Visibility="Collapsed" >
            <DockPanel HorizontalAlignment="Center" VerticalAlignment="Center">
                <Border BorderBrush="{StaticResource WindowBorderBrush}" BorderThickness="1" CornerRadius="0" Background="{StaticResource WindowBackgroundBrush}">
                    <TextBlock Margin="40, 20, 40, 20" FontSize="32" FontWeight="Light" Text="{x:Static p:Resources.Loading}" />
                </Border>
            </DockPanel>
        </DockPanel>

        <wpf:ProjectSettings x:Name="initialSetup" Visibility="Collapsed" Grid.RowSpan="10" Closed="initialSetup_Closed" />

        <wpf:NewOutbreak x:Name="newOutbreak" Visibility="Collapsed" Grid.RowSpan="10" Closed="newOutbreak_Closed" />
    </Grid>
</Window>
